import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import viewUI from 'view-design'
import ViewUI from 'view-design'
import * as util from '@/libs/util';
import i18n from '@/locale'
import config from '@/config'
import installPlugin from '@/plugin'
import Viewer from 'v-viewer'
import VueLazyload from 'vue-lazyload'

import * as echarts from 'echarts';
// import echarts from 'echarts'
Vue.prototype.$echarts = echarts

// 样式
import 'view-design/dist/styles/iview.css'
import './styles/index.less'
import './styles/iconfont.css'
import 'viewerjs/dist/viewer.css'
import './plugin/emoji-awesome/css/google.min.css';


Vue.use(Viewer, {
  defaultOptions: {
    zIndex: 9999
  }
});
Vue.use(ViewUI, {
  i18n: (key, value) => i18n.t(key, value)
});
Vue.use(VueLazyload, {
  preLoad: 1.3,
  error: require('./assets/images/no.png'),
  loading: require('./assets/images/moren.jpg'),
  attempt: 1,
  listenEvents: ['scroll', 'wheel', 'mousewheel', 'resize', 'animationend', 'transitionend', 'touchmove']
});


Vue.config.productionTip = false

/**
 * @description 注册admin内置插件
 */
installPlugin(Vue);
/**
 * @description 生产环境关掉提示
 */
Vue.config.productionTip = false;
/**
 * @description 全局注册应用配置
 */
Vue.prototype.$config = config;

new Vue({
  router,
  store,
  i18n,
  render: h => h(App)
}).$mount('#app')
